<script>
  import { getContext } from "svelte";
  let childRefs = getContext("childRefs");
  let { option, value = $bindable(), name } = $props();
  childRefs[name] = {
    getValue() {
      return value;
    },
  };
</script>

<input type={option.type} bind:value />

<style lang="scss">
  input {
    border: 1px solid $border;
    padding: 5px;
  }
</style>
